﻿using System.Buffers;
using System.IO;
using System.Threading;
using System.Threading.Tasks;

namespace WholeSlideImageLibrary.DeepZoom
{
    public abstract class DeepZoomTileSource
    {
        public abstract EncodedImageFileFormat TileFileFormat { get; }

        public abstract string GetDefinitionFile();

        public abstract bool CheckTileExists(int layer, int column, int row);

        public abstract Task WriteToStreamAsync(int layer, int column, int row, Stream stream, CancellationToken cancellationToken);

        public abstract Task WriteToBufferAsync(int layer, int column, int row, IBufferWriter<byte> writer, CancellationToken cancellationToken);
    }
}
